﻿using Coding4Fun.MissionControl.WP.Misc;
using System.Collections.ObjectModel;

namespace Coding4Fun.MissionControl.WP.ViewModels
{
    public class CommandsPageViewModel : BindableBase
    {
        static CommandsPageViewModel instance = null;
        static readonly object padlock = new object();

        public CommandsPageViewModel()
        {
            Commands = new ObservableCollection<string>();
        }

        public static CommandsPageViewModel Instance
        {
            get
            {
                lock (padlock)
                {
                    if (instance == null)
                    {
                        instance = new CommandsPageViewModel();
                    }
                    return instance;
                }
            }
        }

        private ObservableCollection<string> _commands;
        public ObservableCollection<string> Commands
        {
            get
            {
                return _commands;
            }
            set
            {
                SetProperty(ref _commands, value, "Commands");
            }
        }
    }
}
